package com.sunriz.refreshhcdata.POJO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * ClassName: Result
 * Package: com.sunriz.refreshhcdata.POJO
 * Description:
 *
 * @Author BuTang
 * @Create 2024/10/15 15:43
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Boolean success;
    private String errorMsg;
    private Object data;
    private String code;

    public static Result success(){
        return new Result(true, null, null, "200");
    }
    public static Result success(Object data){
        return new Result(true, null, data, "200");
    }
    public static Result fail(String errorMsg,String code){
        return new Result(false, errorMsg, null, code);
    }
}